home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / utility / shrom20a.zip / SHROOM.DOC < prev   
Text File  |  1992-06-24  |  21KB  |  486 lines

  1.  
  2.     shroom.doc    - readme file for Shell Room Utility
  3.  
  4.     Copyright (C) Davis Augustine 1990-1992.  All rights reserved.
  5.  
  6.     Last Modified:    24jun92.  Version 2.0a
  7.  
  8. Files
  9. -----
  10.     SHROOM.COM    - The program.
  11.     SHROOM.DOC    - This documentation file.
  12.  
  13. Description
  14. -----------
  15.     SHROOM is a utility that gives a DOS application's shells more
  16.     room.  It does this by intercepting the shell operation,
  17.     swapping out the application program, freeing up the memory,
  18.     and then performing the shell operation.  It also intercepts
  19.     the exit from the shell, so that it can swap the application
  20.     back in before returning to it.  The program is none the wiser.
  21.  
  22. Features
  23. --------
  24.      o    Easy to use.
  25.      o    Detects swap file overflow (disk full) and asks whether you want
  26.     to abort back to the application or continue with a partial swap.
  27.      o    Detects TSR loading and unloading during the shell.  Frees
  28.     the TSR's resources and puts a warning message.
  29.      o    Small resident size (about 6k).  Frees nearly all of the memory.
  30.      o    Allows you to increase COMMAND.COM's environment size.
  31.      o    Works with all major DOS applications.
  32.      o    Fully user specifiable swap file path.    Ie., you can put
  33.     it on a virtual disk.
  34.      o    Swaps allocated memory only, avoiding unnecessary writes
  35.     and reads of free memory.
  36.      o    Intelligent command line parsing.  Searches DOS's PATH
  37.     for program to load, allows passing of args to the program.
  38.     Automatically tries .COM and .EXE extensions if not
  39.     specified by user.
  40.      o    Verbose mode for inquisitive users.
  41.      o    Quiet mode for apathetic users.
  42.      o    Uses DOS "make temp file" facility to prevent network clashes.
  43.  
  44.  
  45. Installation and Operation
  46. --------------------------
  47.      o    To install, just copy SHROOM.COM into a directory in your PATH
  48.     or the directory from which you will run the application.
  49.      o    For help, use the question mark switch, eg. "shroom -?".
  50.      o    To load, just type the normal command used to invoke the
  51.     application, with "shroom " prepended.  Eg, if the application
  52.     is called "edit", then you would use the command "shroom edit".
  53.     Arguments are passed to the application just as before, so eg.
  54.     you can say "shroom edit letter.doc".
  55.      o    To shell out, use whatever shell command is provided by the
  56.     application.  You will see a message from Shroom saying that it
  57.     is swapping the program out, after which the normal shell prompt
  58.     and actions will appear.  When you exit the shell, you will
  59.     again see the "swapping" message from Shroom and then be
  60.     deposited back into the application as usual.
  61.  
  62.  
  63. Help Screen - Displayed by the "-?" switch:
  64. -------------------------------------------
  65.  
  66. Usage: shroom [-?hLnpqvw] [-e #] [-m #] [-o F] [-s P] [-t L] [-z #] Prog [Args]
  67.        -?h : print this help message
  68.         -L : display shareware license
  69.         -n : display program notes (more detailed help)
  70.         -p : proceed (without asking) with partial swap if disk full
  71.         -q : quiet mode - display error messages only
  72.         -v : verbose mode - provide running commentary
  73.         -w : Netware workaround - prevent Novell from closing files
  74.       -e # : set ERRORLEVEL returned if unable to load prog (default = 254)
  75.       -m # : swap a maximum of # kbytes
  76.    -o File : specify file to direct Shroom output messages to
  77.    -s Path : specify DRIVE:DIR in which to create swap file
  78.    -t List : specify which shell programs cause swapping
  79.       -z # : specify environment size for COMMAND.COM
  80.       Prog : application program to execute
  81.       Args : command line to pass to the application
  82.  
  83. Example:   shroom  -p  -e 99  -s E:\  -z 800  wp  letter
  84.  
  85.  
  86. Notes Screen - Displayed by the "-n" switch:
  87. --------------------------------------------
  88.  
  89.           ********** NOTES **********
  90.  
  91. NOTATION:
  92.     'k' is used by Shroom as decimal 1000, not 1024.  E.g., "Swapping 4k"
  93. means swapping 4000 bytes, not 4096 bytes.
  94.  
  95.  
  96. PROGRAM LOADING:
  97.     The application must be a .EXE or .COM file.  You can leave off the
  98. file extension and Shroom will try to find a matching .COM or .EXE file.
  99. Shroom searches for the application program first in the current directory,
  100. then in Shroom's home directory, and finally in the directories of the
  101. PATH environment string.
  102.  
  103.  
  104. SHROOM SWITCHES AND ARGUMENTS:
  105.     All text surrounded by square brackets, as in "[-hnv]", is optional.
  106. Switches can be given in any order, and can be in upper or lower case,
  107. and may be separated by spaces (or not). The space between a switch and
  108. its argument is optional, ie. you can say "-z800" or "-z 800".
  109. Although all our examples use dashes as the switch character, a slash
  110. can also be used: e.g. "Shroom /v /p ...".
  111.  
  112.  
  113. NOVELL NETWARE:
  114.     If you are using Novell Netware, then you may also need to use the "-w"
  115. switch with Shroom, as in "shroom -w prog".  Many versions of Netware
  116. seem to close files unexpectedly if they see that there is free memory
  117. where there used to be a program.  When Shroom swaps out the appli-
  118. cation, Netware notices the memory is free and closes the network files
  119. that that application had open.  The "-w" switch causes Shroom to make
  120. a special call to Netware that disables the "file cleanup feature"
  121. during shell operations, thus keeping your network files open.
  122.  
  123.  
  124. ENVIRONMENT SIZE:
  125.     Many people have run into the following problem: you type the command
  126. "SET MYVAR=WHATEVER" and get back the message "Out of environment space."
  127. This occurs when a TSR is loaded or while a .BAT file is running. You get
  128. around this by adding a line like "SHELL=C:\COMMAND.COM /E:2000" to your
  129. CONFIG.SYS file, thus increasing the minimum environment space to 2000
  130. bytes. However, when you shell out from an application and then run a
  131. .BAT file, you find that the environment size has again been restricted
  132. and the CONFIG.SYS line has no effect.
  133.  
  134.     What you need is the amazing new "-z #" switch from Shroom. It causes
  135. Shroom to append the string " /E:#" to COMMAND.COM's command line, thus
  136. setting the desired minimum environment space for the new shell. Note
  137. that in DOS 3.0, # is the size in paragraphs. In later versions it is
  138. in bytes.
  139.  
  140.  
  141. EXIT RETURN CODES:
  142.     Shroom exits immediately if it cannot load the application, returning
  143. an ERRORLEVEL of 254, unless you have changed the value with the "-e #"
  144. switch.  If it can load the application, then Shroom exits when the
  145. application does, and returns the application's exit code.
  146.  
  147.  
  148. SWAP FILE:
  149.     Shroom stores the application in a temporary swap file during the
  150. shell.  The swap file always has extension ".OOM".  The main part of
  151. its name is derived from the application name followed by some digits.
  152. E.g., "WP_000.OOM".  When you exit from the shell, Shroom reads the
  153. file back in and then deletes it.  Obviously, you should not delete,
  154. rename or otherwise modify the swap file while you are in the shell.
  155. If you crash the system while in the shell, then the swap file will
  156. still be there after you reboot (unless you were using a ram disk),
  157. and it is a good idea to delete it then.  The file is readonly so
  158. you will need to run attrib -r on it first.
  159.  
  160.     Shroom (among many other programs) looks for the environment variable
  161. TEMP at startup.  If TEMP is defined, then Shroom takes its definition
  162. as the default location of the swap file.  If TEMP is not defined, then
  163. the current directory becomes the default swap file location.  If you
  164. give the -s DRIVE:DIR switch on the command line, then that overrides
  165. the default location.  The swap file location is determined only once,
  166. during Shroom's startup.  Changing your current drive or directory while
  167. in the application or a shell will not affect where the swap file goes.
  168. Finally, if you have a ram disk with enough room, it makes an excellent
  169. home for the Shroom swap file.  It is fast and "self-deleting" if you
  170. crash the PC.
  171.  
  172.  
  173. SWAP FILE SIZE:
  174.     By default Shroom attempts to free up all memory "above" it in the
  175. DOS 640K.  Typical swap file sizes are 200K to 500K.  If the swap file
  176. is too big to fit on the disk, Shroom asks whether you want to perform
  177. the Shell operation anyway or cancel it.  Or you can use the "-p" option
  178. which tells Shroom to proceed with all Shell operations even if it can
  179. only do a partial swap.  If you want to limit the swap file size you
  180. can use the -m N switch.  For example, the command "shroom -m 125 prog"
  181. will limit the swap file size to 125000 bytes.
  182.  
  183.  
  184. TARGET LIST:
  185.     (Most people don't need to worry about this.)  When Shroom notices
  186. that a program is being shelled, it checks the name of that program
  187. against the target list. If it is in the list, then Shroom goes ahead
  188. and does its thing, swapping the application and freeing its memory.
  189. If the shelled program is not in the target list, then Shroom lets the
  190. program load and execute normally without any swapping.
  191.  
  192.     The purpose of the target list is to prevent unwanted swapping.  There
  193. are a few applications which "shell" their own overlays, and if Shroom
  194. swapped them then the overlays wouldn't have anyone to talk to!
  195.  
  196.     The default target list contains just your command shell, as defined
  197. by the COMSPEC environment string.  The -t switch is used to change the
  198. target list.  It takes a list of filenames separated by commas.  The file
  199. names are case independent and should not have drive or directory paths.
  200. The ~ (tilde) string can be used to refer to the COMSPEC definition.
  201. For example, "shroom -t ~, SUBPROG.EXE ..." would cause swappping on
  202. the default shell and when SUBPROG.EXE is spawned.  Typical shells are
  203. COMMAND.COM, 4DOS.COM, NDOS.COM and SH.EXE.
  204.  
  205.     Another special string is * (asterisk).  It is the wildcard target
  206. list, which causes Shroom to spawn on all shell operations.  It should
  207. be the only -t argument, as in: "shroom -p -t * -v ...".
  208.  
  209.  
  210. APPLICATIONS THAT DO "BACKGROUND PROCESSING":
  211.     You may have a communications package which allows you to initiate a
  212. file transfer and then shell out to do other things.  This will probably
  213. not work if the package was Shroom'ed, because the application is actually
  214. unloaded from memory (and from the interrupt vector table) during the
  215. shell.  The background processing code will not be there anymore!
  216.  
  217.  
  218. ENVIRONMENTAL IMPACT:
  219.     Shroom is processor (8086, 286, 386, etc) independent.  It does not do
  220. any floating point.  It doesn't care about or use expanded or extended
  221. memory (a future version will be able to swap to extended mem).  It works
  222. with DOS Extender (e.g. Pharlap) based applications.  It may work in the
  223. Windows, Desqview and other pseudo or real multi-tasking environments, but
  224. you're basically on your own (caveat sharer).
  225.  
  226.  
  227. LOADING TSR'S INSIDE SHELLS:
  228.     In general, it is not safe to load a TSR while shelled out of an
  229. application, unless you delete the TSR before exiting the shell.  A
  230. variety of memory and interrupt handling problems can occur.  This
  231. is true even when you are not using Shroom.  If you are using Shroom,
  232. then any TSR's that were loaded during the shell will be automatically
  233. unloaded when you return to the application.  If a TSR was loaded "high",
  234. then it will stay loaded high but may cause problems if it uses any
  235. interrupts that the application uses.  Shroom displays the message:
  236. "WARNING: Interrupt ## used by application, changed in shell." if that
  237. occurs.
  238.  
  239.  
  240. UNLOADING TSR'S INSIDE SHELLS:
  241.     The sequence in mind is: You Load a TSR, enter an application,
  242. shell out, then unload the TSR.  The main danger in doing this is that
  243. unloading the TSR may restore interrupt vectors that the application
  244. had remapped.  The chain would be changed from TABLE->APP->TSR->SYSTEM
  245. to TABLE->SYSTEM, thus "cutting out" the app.  Fortunately, Shroom is
  246. able to detect when this occurs.  If you see the message "WARNING: 
  247. Interrupt ## used by application, changed in shell", then that is what
  248. happened.  You should probably save your changes to a new temp file if
  249. possible, and exit the application.  You're not guaranteed to be able
  250. to do this, so be sure to hold your breath.
  251.  
  252.     You don't really need to know what interrupts are or understand any
  253. of the above.  The bottom line is: don't play with TSR's when shelled
  254. out of an application.  If you can't resist the urge to, then at least
  255. Shroom will provide some insurance by catching and attempting to deal
  256. with conflicts when they occur.
  257.  
  258.  
  259. REPORTING BUGS:
  260.     If Shroom is not working as advertised for you, please tell me about
  261. it and I'll try to fix it.  Shroom problems are usually due to conflicts
  262. with other software packages.  You should send a problem report via
  263. regular or electronic mail with a description of the malfunction and
  264. a listing of your CONFIG.SYS and AUTOEXEC.BAT files.  Use the switches
  265. "-v -o FILE" to create a log of the malfunctioning session.  You may
  266. also be asked to send a copy of the misbehaving application so that I
  267. can debug with it.  (It usually takes more time to obtain the software
  268. and/or reproduce the bug than it does to fix it.)
  269.  
  270.  
  271. Shareware License - Displayed by the "-L" switch:
  272. -------------------------------------------------
  273.           ********** SHROOM SHAREWARE LICENSE **********
  274.  
  275.  This is a copyrighted software work which is distributed as shareware.
  276.  Under this license agreement you are granted the right to use Shroom
  277.  on all machines and environments that it supports.  You are also
  278.  free (and encouraged) to pass copies of this shareware on to others
  279.  as long as it is not for payment and not bundled with anything else
  280.  that is for payment.
  281.  
  282.  The shareware registration fee is $25 for single users, $95 for groups
  283.  (up to 12 users).  To receive a diskette, please add $15 for shipping
  284.  and handling and specify diskette type.  Send check or money order to:
  285.  
  286.                Davis Augustine (Shroom Shareware)
  287.                P.O. Box 610
  288.                Sausalito, CA. 94966-0610
  289.  
  290.  Please include your name and postal or email address.  Also please mention
  291.  the Shroom version you are registering and how you obtained it.
  292.  
  293.  Commercial distribution licenses, source code and customized versions are
  294.  also available at reasonable rates.  Please write to the above address or
  295.  send me email at CompuServe id 72230,3053.  I would also appreciate any
  296.  comments, questions, suggestions or bug reports.  The latest Shroom release
  297.  can usually be found in CompuServe forums IBMSYS, lib 3 and TAPCIS, lib 2.
  298.  
  299.  
  300.         ----------------------
  301.         |  REVISION HISTORY  |
  302.         ----------------------
  303.  
  304.  
  305. Changes in v2.0a (24jun92)
  306. --------------------------
  307.     Add -w switch for Novell Netware workaround.  Keeps Novell from
  308.     closing network files that were opened by the swapped application(s).
  309.  
  310.     Add -m N switch to set maximimum swap file size to Nk.  (Thanks
  311.     to user MGZ).
  312.  
  313.     Change 'k' to mean 1000x, not 1024x.
  314.  
  315.     On partial swap, show actual size swapped back in, not the
  316.     attempted size.
  317.  
  318. Changes in v1.9d (26may92)
  319. --------------------------
  320.     Change to new mailing address.  Lower diskette shipping charges
  321.     from $25 to $15.
  322.  
  323. Changes in v1.9c (7mar92)
  324. --------------------------
  325.     Change nonsensical swap file names to app_###.OOM.  (Thanks to
  326.     users ML and RMB).
  327.  
  328.     Make swap file readonly.  (Thanks to users JB, ML, et al).
  329.  
  330.     Show DOS error codes in decimal instead of hex.
  331.  
  332.  
  333. Changes in v1.8k (15dec91)
  334. -------------------------
  335.     Fix shroom's exit code when -v switch used.  Was always exiting
  336.     with ERRORLEVEL 0 when -v was given.  (Thanks to user B).
  337.  
  338.  
  339. Changes in v1.8j (30oct91)
  340. -------------------------
  341.     Allow tilde in target list to indicate COMSPEC file.
  342.  
  343.     Add -o F switch to redirect output to a file.  (Thanks to user RE).
  344.  
  345.  
  346. Changes in v1.8g (14sep91)
  347. -------------------------
  348.     Use TEMP environment string as default swap file location.
  349. Previously we used the current directory.  You still use the "-s PATH"
  350. switch to override the default.  (Thanks to users LC, ML).
  351.  
  352.     Start application with full path name, not just command name
  353. given (eg. C:\BIN\COOLPROG.EXE, not COOLPROG.EXE).  Makes Clipper
  354. work (was giving "overlay not found" error).  (Thanks to user LM).
  355.  
  356.     Make it work better with systems (such as MKS) where / (slash)
  357. is the path separator, instead of backslash.  Wasn't finding app if
  358. it was in same dir as Shroom.
  359.  
  360.     Detect and warn user when interrupts used by the application
  361. have been changed in the Shell, apparently by unloading a TSR.  Improve
  362. TSR detection and deciding when to unload it and when not.
  363.  
  364.     Changes to interrupt handling to work better with PC NFS and
  365. some other software.
  366.  
  367.     Fix application startup so it is not fooled by APPEND.  If a
  368. directory containing app was APPENDED, Shroom would think app was in
  369. the current directory.  (Thanks to user DG).
  370.  
  371.     Add sections on TSR's and reporting bugs to notes.
  372.  
  373.     Make -q suppress startup message, too.  (For user ML).
  374.  
  375.     Show command being passed to app, besides app name (unless -q).
  376.  
  377.     If verbose, show exit codes from shells and from app.  Also
  378. if verbose, show swap file location at startup.
  379.  
  380.  
  381. Changes in v1.7d (14aug91)
  382. --------------------------
  383.     Fix problem with -z # switch when comline is not empty.  Was
  384. overwriting existing comline instead of inserting in front of it.
  385. (Thanks to user LH).
  386.  
  387.  
  388. Changes in v1.7b (6aug91)
  389. --------------------------
  390.     Fix problem with Fortran programs.  Was causing "Floating point
  391. not loaded" error at application load time.  Hey, don't blame me, the
  392. bug is in the Fortran startup code!  (Thanks to users RS and DF).
  393.  
  394.     Disable control-C during swapping.  Would cause system hang and
  395. other strange behavior (especially by the user!).
  396.  
  397.     Bring back group shareware registration, by popular demand.
  398.  
  399.  
  400. Changes in v1.6d (21jul91)
  401. --------------------------
  402.     Fix state saving and restoring to work better with other TSR's.
  403. With a few TSR's, system would reliably hang when you exited the
  404. application back to DOS, if a shroom swap occurred in the application.
  405. (Thanks to user ML)
  406.  
  407.  
  408. Changes in v1.6c (22jun91)
  409. --------------------------
  410.     Get default target list from the COMSPEC environment string. So, if
  411. you use a shell other than COMMAND.COM, Shroom will automatically recognize
  412. it.  (Thanks to user MB)
  413.  
  414.     Fix problem in 1.6b, where swapping may have not been done with
  415. some applications.  Was failing to handle lowercase shell names correctly.
  416.  
  417.  
  418. Changes in v1.6b (14jun91)
  419. --------------------------
  420.     Only swap out specified shell programs.  Default list is COMMAND.COM.
  421. Add -t switch to specify others. (Thanks to user LH)
  422.  
  423.     Add -z switch to allow increasing the environment space of
  424. COMMAND.COM. (Thanks to user DM)
  425.  
  426.     The -v switch as part of its verbosity shows the shell program being
  427. executed and its command line.
  428.  
  429.  
  430. Changes in v1.5d (3may91)
  431. --------------------------
  432.     Search for the application in Shroom's home directory, too.
  433. (Thanks to user CS)
  434.  
  435.  
  436. Changes in v1.5c (26apr91)
  437. --------------------------
  438.     Fix a bug in 1.5b, when checking for unswappable blocks.  Caused
  439. some applications to swap zero bytes.  (Thanks to user JG)
  440.  
  441.     Mention CompuServe home library in license.
  442.  
  443.  
  444. Changes in v1.5b (29mar91)
  445. --------------------------
  446.     Fix a bug in swapping.    Leave alone any high blocks that are
  447. allocated by TSR's.  This caused shells to hang when Shroom was used
  448. with some software (such as QCache).  (Thanks to user RM)
  449.  
  450.  
  451. Changes in v1.5a (24mar91)
  452. --------------------------
  453.     Add -q switch for quiet mode.  Suppresses the "SHROOM: swapping..."
  454. messages but still lets error messages through.
  455.  
  456.     Add -p switch to force partial swaps.  If Shroom is unable to
  457. swap all of the application out, it normally asks you whether you want
  458. to proceed with the shell or return to the application.  With the -p
  459. switch, it always proceeds with the shell without asking you.
  460.  
  461.     Add -e errorlevel switch to allow you to specify the exit value
  462. returned by Shroom if it is unable to load the application.  This allows
  463. you to choose a value which does not conflict with those returned by
  464. your other applications.  This feature is only useful to those who make
  465. serious use of "if ERRORLEVEL..." statements in DOS batch files.
  466. (Thanks to user WB)
  467.  
  468.     Add -n switch to show program notes, and add more information
  469. to the notes.  There is now a help screen (-h), a shareware license
  470. screen (-l) and a notes screen (-n).
  471.  
  472.     Properly delete the temporary swap file when the user aborts
  473. the shell on disk full error (ie. when you pick 'A' to return to the
  474. application).  In previous versions of Shroom, the file was never
  475. deleted, thus leaving temporary files with names like "0A982331" lying
  476. around.
  477.  
  478.  
  479. Changes in v1.4d (14mar91)
  480. --------------------------
  481.     Shroom returns the ERRORLEVEL of the application program which
  482. was executed.  If the application fails to execute, then Shroom returns
  483. an ERRORLEVEL of 2.  Previously, Shroom always returned ERRORLEVEL 0
  484. if the application was successfully executed.
  485.  
  486.